package com.example.lbstest.impl;


import java.util.List;

import com.example.lbstest.mapper.UserMapper;
import com.example.lbstest.pojo.User;
import com.example.lbstest.service.UserMapperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


@Service
public  class UserMapperServiceImpl implements UserMapperService {

   @Autowired
   UserMapper userMapper;


    @Override
    public List<User> selectAllUser(User user) {

        List<User> users = userMapper.selectAllUser(user);

        return users;
    }
    @Override
    public List<User> selectPreUser() {
        // TODO Auto-generated method stub
        List<User> users = userMapper.selectPreUser();

        return users;
    }

    @Override
    public void addUser(User user) {
        // TODO Auto-generated method stub
        userMapper.addUser(user);
    }

    @Override
    public void updateUser(User user) {
        // TODO Auto-generated method stub
        userMapper.updateUser(user);
    }

    @Override
    public void deleteUser(long id) {
        // TODO Auto-generated method stub
        userMapper.deleteUser(id);
    }




    @Override
    public User login(String loginname, String password) {
        // TODO Auto-generated method stub
        User user = userMapper.login(loginname, password);
        return user;

    }


}

